<template>
  <div class='row'>
    <h2 class=" text-center">
      患者详情
    </h2>
    <br>
    <div id="queryinput" class="container-fluid">
      <div class="row-fluid">
        <div class="span6">
          <form class="form-horizontal contract-form">
            <div class="form-group">
              <label class="col-sm-3 control-label">编号</label>
              <div class="col-sm-2">
                <input id="mem_id" name="id" type="text" class="form-control contact-name-input" v-model="item.id"
                       readonly/>
              </div>
              <label class="col-sm-2 control-label">联系人</label>
              <div class="col-sm-2">
                <input id="linkman" name="linkman" type="text" class="form-control contact-name-input" v-model="item.id"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">姓名</label>
              <div class="col-sm-2">
                <input id="username" name="name" type="text" class="form-control contact-name-input" v-model="username"/>
              </div>
              <label class="col-sm-2 control-label">住址</label>
              <div class="col-sm-4">
                <input type="text" id="address" name="address"
                       class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">出生日期</label>
              <div class="col-sm-2">
                <input type="text" id="birthday" name="birthday" class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-2 control-label">电子邮箱</label>
              <div class="col-sm-2">
                <input type="text" id="mail" name="mail"
                       class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">性别</label>
              <div class="col-sm-2">
                <input type="radio" id="sex" name="sex" value="man" v-model="picked">
                <label for="sex">男</label>
                &nbsp; &nbsp; &nbsp;
                <input type="radio" id="sex2" name="sex" value="woman" v-model="picked">
                <label for="sex2">女</label>
              </div>

              <label class="col-sm-2 control-label">联系电话</label>
              <div class="col-sm-2">
                <input type="text" id="phone" name="phone"
                       class="form-control contact-name-input"/>
              </div>
            </div>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  基本生理信息
                </h4>
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">体重(Kg)</label>
              <div class="col-sm-1">
                <input type="text" id="weight" name="weight"
                       class="form-control contact-name-input"/>
              </div>
              <label class="col-sm-3 control-label">身高(cm)</label>
              <div class="col-sm-1">
                <input type="text" id="heigh" name="heigh" class="form-control contact-name-input"/>
              </div>
            </div>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  最近检查记录
                </h4>
              </div>
            </div>

            <div class="form-group">
              <label class="col-sm-3 control-label">责任医师</label>
              <div class="col-sm-2">
                <input type="text" id="doctor" name="doctor" class="form-control contact-name-input"/>
              </div>

              <label class="col-sm-2 control-label">检查日期</label>
              <div class="col-sm-2">
                <input type="text" id="checkdate" name="checkdate" class="form-control contact-name-input"/>
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-3 control-label">检查方式</label>
              <div class="col-sm-2">
                <input type="text" id="checktype" name="checktype" class="form-control contact-name-input"/>
              </div>

              <label class="col-sm-2 control-label">检查地点</label>
              <div class="col-sm-2">
                <input type="text" id="checkaddress" name="checkaddress" class="form-control contact-name-input"/>
              </div>
            </div>
            <a class="col-sm-offset-3 col-sm-3" v-link="{path: '/report'}" v-on:click="onEditItem(item)">检查报告</a>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  历史检查记录和数据
                </h4>
              </div>
            </div>
            <node-view :url="urlnode"></node-view>

            <div class="row-fluid">
              <div class="col-sm-12">
                <h4 class="page-header">
                  历史报告清单
                </h4>
              </div>
            </div>

            <task-view :url="url"></task-view>
          </form>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
  import nodeView from '../template-node/list-node.vue'
  import taskView from '../template-task/list-task.vue'
  export default {
    data: function () {
      return {
        currentView: 'search',
        modeTitle: '',
        curitem: {},
        curitems: [],
        criterion: '',
        pagenum: '',
        pagesteps: '',
        mode: 'modeList',
        urltask: 'http://euvee.vicp.co/rest/task/',
        urlnode: 'http://euvee.vicp.co/rest/fdb/'
      }
    },
    components: {
      taskView,
      nodeView
    }
  }
</script>
